function crc32(t) {
    for (var e, r = [], n = 0; n < 256; n++) {
        e = n;
        for (var o = 0; o < 8; o++)
            e = 1 & e ? 3988292384 ^ e >>> 1 : e >>> 1;
        r[n] = e
    }
    for (var i = -1, a = 0; a < t.length; a++)
        i = i >>> 8 ^ r[255 & (i ^ t.charCodeAt(a))];
    return ~i >>> 0
}

var CHARSET = "abcdefghijklmnopqrstuvwxyz1234567890";

function genRandomString(t) {
    let e = Array(t).fill(undefined).map(function () {
        return CHARSET[Math.floor(36 * Math.random())];
    }).join("");  // 将生成的字符数组转换成字符串

    return e;
}

function generateLocalId() {
    var e, r, n, o, i, a = 5;
    o = "".concat((+new Date).toString(16));
    n = o + genRandomString(30);
    r = n + a;
    e = r + "0";
    let u = e + "000";
    // console.log(u);
    let s = crc32(u);
    i = "".concat(u);
    let a1 = (i + s).substring(0, 52);
    return a1;
}

console.log(generateLocalId());